import api from './URL.js'
import request from '@/utils/request.js'

// 轮播图
export const API_SwiperData = data => {
	const {
		url
	} = api.SwiperData;
	return request(url, data)
}
// 导航栏
export const API_Catitems = data => {
	const {
		url
	} = api.Catitems;
	return request(url, data)
}
// 楼层
export const API_Floordata = data => {
	const {
		url
	} = api.Floordata;
	return request(url, data)
}
// 商品分类
export const API_Categories = data => {
	const {
		url
	} = api.Categories;
	return request(url, data)
}
// 商品列表搜索
export const API_SearchList = data => {
	const {
		url
	} = api.SearchList;
	return request(url, data)
}
// 商品详情
export const API_GoodDetail = data => {
	const {
		url
	} = api.GoodDetail;
	return request(url, data)
}
// 商品搜索
export const API_GoodSearch = data => {
	const {
		url
	} = api.GoodSearch;
	return request(url, data)
}
// 获取用户token
export const API_WxLogin = data => {
	const {
		url
	} = api.WxLogin;
	return request(url, data)
}
// 获取支付参数
export const API_OrderParame = data => {
	const {
		url
	} = api.OrderParame;
	return request(url, data)
}
// 创建订单
export const API_OrderCreate = data => {
	const {
		url
	} = api.OrderCreate;
	return request(url, data)
}
// 查看订单支付状态
export const API_OrderState = data => {
	const {
		url
	} = api.OrderState;
	return request(url, data)
}
// 历史订单查询
export const API_OldOrder = data => {
	const {
		url
	} = api.OldOrder;
	return request(url, data)
}